{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf390
{\fonttbl\f0\fnil\fcharset77 Monaco;}
{\colortbl;\red255\green255\blue255;\red191\green0\blue0;\red0\green0\blue191;\red96\green96\blue96;
}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs22 \cf0 \
\cf2 // simpleSamplePlayerSynthdefs.rtf\cf0 \
\cf2 // Macintosh Compiled versions of these are in the folder called synthdefs\cf0 \
\cf2 // A bunch of Synthdefs from the supercollider docs, some modified, some my own...\cf0 \
\cf2 // Some of the below copyright (C) 2003 - 2006 Jonathan Saggau\cf0 \
\cf2 // License: GPL\cf0 \
\cf2 // Others from SC Docs\cf0 \
\cf2 // License: GPL\cf0 \
\cf2 // Still others from SC-users list\cf0 \
\cf2 // License: free\cf0 \
\cf2 //\cf0 \
\cf2 //___________________________________________________________________________________________\cf0 \
\
(\
\
\cf3 SynthDef\cf0 (\cf4 "JASDiskinSamplePlayerStereo"\cf0 , \
    \{ \cf3 arg\cf0  outBus = 0, bufnum = 0, amp = 1;\
	\cf3 Out\cf0 .ar(outBus, \cf3 DiskIn\cf0 .ar(2, bufnum)*amp);\
\}).writeDefFile;\
\
\
\cf3 SynthDef\cf0 (\cf4 "JASDiskinSamplePlayerMono"\cf0 , \
    \{ \cf3 arg\cf0  outBus = 0, bufnum = 0, amp = 1, panIt = 0;\
	\cf3 Out\cf0 .ar(outBus, \cf3 Pan2\cf0 .ar(\cf3 DiskIn\cf0 .ar(1, bufnum)*amp), panIt);\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASMonoPan2SamplePlayer"\cf0 , \{ \cf3 arg\cf0  outBus = 0, bufnum = 0, rateSCale = 1, amp = 1, loopIt = 1, panIt = 0; \
	\cf3 Out\cf0 .ar(\
		outBus,\
		\cf3 Pan2\cf0 .ar(\
			\cf3 PlayBuf\cf0 .ar(\
				1, \cf2 // number of channels\cf0 \
				bufnum,			\
				\cf3 BufRateScale\cf0 .kr(bufnum) * rateSCale,					loop: loopIt\
				),\
		panIt \cf2 // position in stereo Field\cf0 \
		)\
		*\
		amp\
	)\
\}).writeDefFile;\
\
\cf2 // define a sample player that will loop over a soundfile  (SaggauModified)\cf0 \
\cf3 SynthDef\cf0 (\cf4 "JASMonoSamplePlayer"\cf0 , \{ \cf3 arg\cf0  outBus = 0, bufnum = 0, rateSCale = 1, amp = 1,  loopIt = 1;\
	\cf3 Out\cf0 .ar(\
		outBus,\
		\cf3 PlayBuf\cf0 .ar(\
			1, \cf2 // number of channels\cf0 \
			bufnum, \cf2 // the buffer Number to get the sound from\cf0 \
			\cf3 BufRateScale\cf0 .kr(bufnum) * rateSCale,\
			loop: loopIt\
		)\
		*\
		amp\
	)\
\}).writeDefFile;\
\
\cf2 // define a sample player that will loop over a soundfile  (SaggauModified)\cf0 \
\cf3 SynthDef\cf0 (\cf4 "JASStereoSamplePlayer"\cf0 , \{ \cf3 arg\cf0  outBus = 0, bufnum = 0, rateSCale = 1, amp = 1, loopIt = 1;\
	\cf3 Out\cf0 .ar(\
		outBus,\
		\cf3 PlayBuf\cf0 .ar(\
			2, \cf2 // number of channels\cf0 \
			bufnum, \cf2 // the buffer Number to get the sound from\cf0 \
			\cf3 BufRateScale\cf0 .kr(bufnum) * rateSCale,\
								              \cf2 // ^adds a bit of random fun to playback rate?\cf0 \
			loop: loopIt			\cf2 // if 1 - play the soundfile over and over without stopping\cf0 \
		)\
		*\
		amp\
	)\
\}).writeDefFile;\
)\
}